package kadledav.adventure.framework.controll.commands;

import java.io.PrintStream;
import java.util.Scanner;

import kadledav.adventure.framework.controll.ControllConstants;
import kadledav.adventure.framework.controll.commands.abstr.PrintDescriptionCommnad;
import kadledav.adventure.framework.model.world.Player;

public class ExploreCommand extends PrintDescriptionCommnad{
	
	public static final String EXPLORE_LOCATION = "look";
	
	public ExploreCommand(PrintStream out, Scanner in, Player player) {
		super(out, in, player);
	}

	@Override
	public void execute(String[] userCommand) {
		out.println(player.getCurrentLocation().getName());
		out.println(" -> "+player.getCurrentLocation().getDescription());
		if(!printDescribableObject(player.getCurrentLocation().getPossibleExits(),ControllConstants.PASSAGE_PREFIX, "Vidim mozne pruchody:")){
			out.println("Pruochody zde nejsou");
		}
		if(!printDescribableObject(player.getCurrentLocation().getItems(),ControllConstants.LOCATION_ITEM_PREFIX, "Vidim predmety:")){
			out.println("Predmety zde nejsou");
		}
		out.println();
	}
	
}
